﻿namespace NUnitGenAddIn.Core
{
    /// <summary>
    /// Helper class to show Progress 
    /// </summary>
    public static class ProgressHelper
    {
        static readonly ProgressForm _progress = new ProgressForm();
        
        /// <summary>
        /// Gets or sets the progress maximum.
        /// </summary>
        /// <value>The progress maximum.</value>
        public static int Maximum
        {
            get
            {
                return _progress.Maximum;
            } 
            set
            {
                _progress.Maximum = value;
            }
        }
        
        /// <summary>
        /// Shows the progress.
        /// </summary>
        public static void ShowProgress()
        {
            _progress.Reset();
            _progress.Show();
        }

        /// <summary>
        /// Performs the step.
        /// </summary>
        public static void PerformStep()
        {
            _progress.PerformStep();
        }
        
        /// <summary>
        /// Closes the progress.
        /// </summary>
        public static void CloseProgress()
        {
            _progress.Hide();
        }

    }
}
